package com.wswy.wzcx.model.dmv;

import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.gson.annotations.SerializedName;

public class DepartmentInfo implements android.os.Parcelable {

  @SerializedName("id")
  public int id;

  @SerializedName("address")
  public String address;

  @SerializedName("name")
  public String name;

  @SerializedName("scope")
  public String scope;

  @SerializedName("tel")
  public String tel;

  @SerializedName("workTime")
  public String workTime;

  @SerializedName("lat")
  public double lat;

  @SerializedName("lon")
  public double lon;

  public float distancKM;


  @Override
  public int describeContents() {
    return 0;
  }

  @Override
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.id);
    dest.writeString(this.address);
    dest.writeString(this.name);
    dest.writeString(this.scope);
    dest.writeString(this.tel);
    dest.writeString(this.workTime);
    dest.writeDouble(this.lat);
    dest.writeDouble(this.lon);
    dest.writeFloat(this.distancKM);
  }

  public DepartmentInfo() {
  }

  protected DepartmentInfo(Parcel in) {
    this.id = in.readInt();
    this.address = in.readString();
    this.name = in.readString();
    this.scope = in.readString();
    this.tel = in.readString();
    this.workTime = in.readString();
    this.lat = in.readDouble();
    this.lon = in.readDouble();
    this.distancKM = in.readFloat();
  }

  public static final Creator<DepartmentInfo> CREATOR = new Creator<DepartmentInfo>() {
    @Override
    public DepartmentInfo createFromParcel(Parcel source) {
      return new DepartmentInfo(source);
    }

    @Override
    public DepartmentInfo[] newArray(int size) {
      return new DepartmentInfo[size];
    }
  };
}
